<template>
<div class="father">
    <p>巴巴</p>
    <p>儿子朋友名字:{{pyyname}}</p>
    <son :snname2='snname1' @cangetname='getname'></son>
    </div>
</template>

<script>
import son from '@/components/son 子传父.vue'
export default {
  components: {
    son
  },
  methods: {
    getname (data) {
      this.pyyname = data
    }
  },
  data () {
    return {
      snname1: '没名字',
      pyyname: '??'
    }
  }

}
</script>

<style>

</style>
